<?php

namespace app\api\validate;
use think\Validate;

class Activity extends Validate{
    protected $rule = [
        'poster'   =>'require',// 海报
        'name'     =>'require', // 场地：场地名称|活动：活动名称|老师：课程名称
        'address'  =>'require', // 场地：场地地址
        'max_num'  =>'require', // 场地：可承载人数|活动：可承载人数
        'fee'      =>'require', // 场地：费用|活动：活动价格
        'is_house' =>'require', // 场地：是否包含住宿
        'square'   =>'require', // 场地：面积
        'begintime'=>'require', // 场地：营业开始时间
        'endtime'  => 'require',// 场地：营业结束时间
        //'extra_service' => 'require', // 场地：场外提供的额外服务
        'is_metro' =>'require', // 场地：附近是否有地铁
        'park_number' =>'require',// 场地：停车场数量
        'is_ticket' =>'require',// 场地：是否能开发票|活动：活动安排
        'category'  =>'require',// 活动：活动类型
        'time'      =>'require',// 活动：活动时长
        'city_id'   =>'require',// 活动：活动地区
        'is_site'   =>'require',// 活动：是否提供场地
        'plan'=>'require',// 活动：活动安排
        
    ];

    protected $message = [
        'poster.require'        =>  30019,
        'name.require'          =>  30020,
        'address.require'       =>  30021,
        'max_num.require'       =>  30022,
        'fee.require'           =>  30023,
        'is_house.require'      =>  30024,
        'square.require'                =>  30025,
        'begintime.require'             =>  30026,
        'endtime.require'               =>  30027,
        'extra_service.require'         =>  30028,
        'is_metro.require'              =>  30029,
        'park_number.require'           =>  30030,
        'is_ticket.require'             =>  30031,
        'category.require'              =>  30032,
        'time.require'                  =>  30033,
        'city_id.require'               =>  30034,
        'is_site.require'               =>  30035,
        'plan.require'           =>  30036,
    ];

    protected $scene = [
        'site' => ['poster','name','address','max_num','fee','is_house','square','begintime','endtime','is_metro','park_number','is_ticket'],
        'activity' => ['poster','name','category','time','fee','max_num','city_id','is_site','plan','is_ticket'],
        'master'     =>  ['poster','name','category','time','fee','plan'],// 场地商注册
    ];
}